package com.icinfo.cloud.provider.punish.ucase.caseregister.service;

import com.icinfo.cloud.provider.punish.csource.manage.dto.CaseSourceDetailDto;
import com.icinfo.cloud.provider.punish.fastcase.dto.FastCaseRegisterInfoQueryDto;
import com.icinfo.cloud.provider.punish.fastcase.dto.FastCaseRegisterSaveDto;
import com.icinfo.cloud.provider.punish.fastcase.vo.FastCaseRegisterInfoVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.service.ICaseStageOperatePublicService;
import com.icinfo.cloud.provider.punish.ucase.caseregister.dto.*;
import com.icinfo.cloud.provider.punish.ucase.caseregister.vo.*;
import com.icinfo.framework.common.web.Result;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author lxj
 * @date 2022/2/24
 **/
public interface ICaseRegisterService  extends ICaseStageOperatePublicService {


    /**
     * 删除立案数据
     * @author lxj
     * @date  2022/2/22
     * @param  caseId 入参
     * @return  boolean
     **/
    boolean delCase(String caseId,String documentCatalogCode);

    /**
     * 预览
     *
     * @param saveDto 保存dto
     * @return {@link Map<String, Object> }
     * @author shishengyao
     * @date 2022/05/28
     */
    Map<String,Object> getCasePreview(CaseRegisterSaveDto saveDto);


    /**
     * 获取有执法证协办人员
     * @author lixj
     * @date 2022/5/6
     * @return
     */
    List<HandleAssistVo> getAssistHandleList(String isContainLogin);

    /**
     * 获取有执法证协办人员
     * @author lixj
     * @date 2022/5/6
     * @return
     */
    List<HandleAssistVo> getAssistHandleListByType(String type);

    /**
     * 获取下级机构信息
     * @param orgCode
     * @return
     */
    List<CaseHandoutVo> getOrgListByTopOrg(String orgCode);

    /**
     * 保存立案登记
     *
     * @param saveDto 立案登记保存dto
     * @return {@link CaseRegisterSaveVo }
     * @author shishengyao
     * @date 2022/05/10
     */
    CaseRegisterSaveVo saveCaseRegister(CaseRegisterSaveDto saveDto);

    /**
     * 暂存立案登记
     *
     * @param saveDto 立案登记保存dto
     * @return int
     * @author shishengyao
     * @date 2022/05/23
     */
    int saveCaseRegisterTemporary(CaseRegisterSaveDto saveDto);

    /**
     * 获取立案登记详情
     *
     * @param queryDto 查询dto
     * @return {@link CaseRegisterInfoVo }
     * @author shishengyao
     * @date 2022/05/23
     */
    CaseRegisterInfoVo getCaseRegisterInfo(CaseRegisterDetailQueryDto queryDto);

    /**
     * 描述：获取重复立案分页列表
     *
     * @param pageRequest 页面请求
     * @return {@link List<  RepeatCaseInfoVo  > }
     * @author shishengyao
     * @date 2022/07/11
     */
    List<RepeatCaseInfoVo> getRepeatCaseInfoList(RepeatCaseInfoPageRequest pageRequest);

    /**
     * 描述： 根据案由编码及当事人获取N年内重复违法次数
     *
     * @author: zhengqiang
     * @date: 2022/7/26
     * @param: request
     * @return {@link int}
     **/
    List<CaseMainReasonRepeatCountVo> getCaseRepeatCountByReasonAndParty(CaseRepeatRequest request);

    /**
     * 【V1.3.2】描述： 根据案由编码及当事人获取N年内重复违法列表
     *
     * @author: zhengqiang
     * @date: 2022/7/21
     * @param: pageRequest
     * @return {@link List< CaseMainReasonRepeatVo>}
     **/
    List<CaseMainReasonRepeatVo> getCaseRepeatListByReasonAndParty(CaseMainReasonRepeatPageRequest pageRequest);

    /**
     * 描述： 根据名称搜索机构用户
     *
     * @author: zhengqiang
     * @date: 2022/8/2
     * @param: userName
     * @return {@link Result}
     **/
    List<HandleAssistVo> searchOrgUserListByName(String userName);

    /**
     * 描述： 根据案由列表及当事人列表获取重复违法列表(分页)
     *
     * @author: zhengqiang
     * @date: 2022/8/3
     * @param: caseId
     * @return {@link int}
     **/
    List<CaseMainReasonRepeatVo> getCaseRepeatPageList(CaseRepeatPageRequest pageRequest);
    /**
     * 案源不予立案案件保存
     * @author liyafeng
     * @date 2022/8/17
     * @param caseSourceDetailDto
     * @return {@link int}
     */
    int saveNoCaseRegister(CaseSourceDetailDto caseSourceDetailDto);

    /**
     * 描述： 外部接入案源处置回传结果
     *
     * @author: zhengqiang
     * @date: 2022/8/19
     * @param: caseId
     * @return {@link Result}
     **/
    Result sendDisposalBackResult(String caseId);

    /**
     * 描述：修改立案登记信息
     *
     * @param saveDto 立案登记保存dto
     * @return {@link CaseRegisterSaveVo }
     * @author shishengyao
     * @date 2022/05/10
     */
    int modifyCaseRegisterInfo(CaseRegisterSaveDto saveDto);

    /**
     * 【V2.0.0】校验立案登记信息
     *
     * @param saveDto 保存dto
     * @return {@link String }
     * @author shishengyao
     * @date 2022/05/10
     */
    String checkAndDealCaseRegisterInfo(CaseRegisterSaveDto saveDto);

    /**
     * 【V1.12.1】描述：简案快办立案登记
     *
     * @author: zhengqiang
     * @date: 2023/8/16
     * @param: saveDto
     * @return {@link CaseRegisterSaveVo}
     **/
    CaseRegisterSaveVo saveFastCaseRegister(FastCaseRegisterSaveDto saveDto);

    /**
     * 【V1.12.1】描述：简案快办暂存
     *
     * @author: zhengqiang
     * @date: 2023/8/17
     * @param: fastCaseRegisterSaveDto
     * @return {@link CaseRegisterSaveVo}
     **/
    CaseRegisterSaveVo saveFastCaseRegisterTemporary(FastCaseRegisterSaveDto fastCaseRegisterSaveDto);

    @Transactional(rollbackFor = Exception.class)
    CaseRegisterSaveVo savCaseRegisterTemporary(RegisterSaveDto fastCaseRegisterSaveDto);

    /**
     * 【V1.12.1】描述： 查询简案快办暂存数据
     *
     * @author: zhengqiang
     * @date: 2023/8/17
     * @param: queryDto
     * @return {@link FastCaseRegisterInfoVo}
     **/
    FastCaseRegisterInfoVo getFastCaseRegisterInfo(FastCaseRegisterInfoQueryDto queryDto);


    /**
     * 移动端普通案件
     *
     * @param saveDto
     * @return
     */
    CaseRegisterSaveVo saveCaseRegisterApp(RegisterSaveDto saveDto);
}
